﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;
using System.Linq;
using System.Web;

namespace GqqMvcWeb.Models.Database
{
    public class MoviesDbContext : DbContext
    {
        public DbSet<movie> Movies { get; set; }
        public DbSet<user> Users { get; set; }
        public DbSet<product> Products { get; set; }

        /// <summary>
        /// 重写OnModelCreating方法，可以修改好多东西。
        /// </summary>
        /// <param name="modelBuilder"></param>
        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
        }
    }


}